import tkinter
from PIL import ImageTk,Image
# def get_image(filename,width,height):
#     im=Image.open(filename).resize((width,height))
#     return ImageTk.PhotoImage(im)


root=tkinter.Tk()
root.title("背景")
root.geometry("800x600+300+150")
root.resizable(False,False)
im=Image.open("OIP-C.gif").resize((800,600))
im_root=ImageTk.PhotoImage(im)
canvas_root=tkinter.Canvas(root,width=800,height=600)
canvas_root.create_image(400,300,image=im_root)
canvas_root.pack()

root.mainloop()